<template>
  <div style="height: 400px; width: 100vw">
    <VirtualList :listData="data" :itemSize="50" />
  </div>
</template>

<script setup>
import VirtualList from "@/components/VirtualList.vue";
import { getImg } from "@/utils/common";
import { ref } from "vue";

const data = ref([]);
for (let i = 0; i < 1000; i++) {
  data.value.push({
    index: i,
    value: "asfsdg",
    imgUrl: i % 2 ? getImg("img4-1.png") : "",
  });
}
</script>

<style>
html {
  height: 100%;
}
body {
  height: 100%;
  margin: 0;
}
#app {
  height: 100%;
}
</style>
